import request from '@/utils/request'

// 查询商品口味列表
export function listFlavour(query) {
  return request({
    url: '/orderEat/flavour/list',
    method: 'get',
    params: query
  })
}

// 回显商品信息
export function echoFlavour(data) {
  return request({
    url: '/orderEat/flavour/echoShop',
    method: 'post',
    data: data
  })
}


// 查询商品规格下拉选
export function listshopSpecification() {
  return request({
    url: '/shop_specification/getShopSpecificationList',
    method: 'get'
  })
}

// 查询商品规格名称下拉选
export function droplistFlavour(specificationId) {
  return request({
    url: '/orderEat/flavour/dropDownList/'+specificationId,
    method: 'get'
  })
}


// 查询商品口味详细
export function getFlavour(flavourId) {
  return request({
    url: '/orderEat/flavour/' + flavourId,
    method: 'get'
  })
}

// 新增商品口味
export function addFlavour(data) {
  return request({
    url: '/orderEat/flavour',
    method: 'post',
    data: data
  })
}

// 关联商品口味
export function associationFlavour(data) {
  return request({
    url: '/orderEat/flavour/associationShopFlavour',
    method: 'post',
    data: data
  })
}

// 修改商品口味
export function updateFlavour(data) {
  return request({
    url: '/orderEat/flavour/editShopFlavour',
    method: 'post',
    data: data
  })
}

// 删除商品口味
export function delFlavour(data) {
  return request({
    url: '/orderEat/flavour/deleteShopFlavour',
    method: 'post',
    data: data
  })
}
